-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ExoPlayer #426
ExoPlayer #426
Conversation
13938e9
to
a8395a1
Compare
@corbt - The ExoPlayer PR you were asking for |
compile "com.android.support:appcompat-v7:23.0.1" | ||
compile "com.facebook.react:react-native:+" // From node_modules | ||
compile project(':react-native-video') | ||
// compile project(':react-native-video-exoplayer') // uncomment to use exoplayer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment out react-native-video
and uncomment react-native-video-exoplayer
to test
/* For ExoPlayer */ | ||
/* source={require('./broadchurch.mp4')} */ | ||
/* source={{ uri: 'http://www.youtube.com/api/manifest/dash/id/bf5bb2419360daf1/source/youtube?as=fmp4_audio_clear,fmp4_sd_hd_clear&sparams=ip,ipbits,expire,source,id,as&ip=0.0.0.0&ipbits=0&expire=19000000000&signature=51AF5F39AB0CEC3E5497CD9C900EBFEAECCCB5C7.8506521BFC350652163895D4C26DEE124209AA9E&key=ik0', type: 'mpd' }} */ | ||
source={{ uri: 'broadchurch', type: 'mp4' }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change video sources to test dash
@AndrewJack THANK YOU FOR THIS |
whoo!!
…On Wed, Jan 11, 2017 at 4:51 AM Matt Apperson ***@***.***> wrote:
@AndrewJack <https://github.com/AndrewJack> THANK YOU FOR THIS
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#426 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAKxKhV0XnChfimOxxqzq21tSbY5vhqDks5rRNBugaJpZM4LU2vn>
.
|
@AndrewJack Does it the default player on Android, or need to specify explicitly? |
You'll need to compile the Change in - compile project(':react-native-video')
+ compile project(':react-native-video-exoplayer') Change in + include ':app',
- ':react-native-video',
+ ':react-native-video-exoplayer'
- project(':react-native-video').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-video/android')
+ project(':react-native-video-exoplayer').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-video/android-exoplayer') |
@AndrewJack Thanks! It's much better performance than the old one. But when playing, change the video source url(different rate) has no effect. Does the api compatible with the old? |
@jaggerwang that's not implemented yet, https://github.com/react-native-community/react-native-video/blob/master/android-exoplayer/README.md Exoplayer doesn't support it out of the box. |
@AndrewJack , I'm not mean to let the player to switch video stream rate automatically. For every video in my app, there are low, middle and high quality urls. When user select a different quality, app will pass the new url to player, but player is still playing the old one. Does it need to recreate the player? |
Oh ok, I'll test switching sources, that should work. I'm guessing you aren't using an adaptive stream (SS, HLS, or DASH)? which would switch bitrate automatically. |
Yes, not adaptive. |
@AndrewJack , sometimes the video did not auto play when first open player, already set paused to false. But when change paused to true and change it back again, the video will play. It seems like it's related to the loading time of the online video. If the loading time is very short, about less than 1s, the video will auto play. |
Works much better except it seems on Android
|
Another issue seems to be if i run the player in a modal video gets very dark for some reason. |
@AndrewJack I try to change video source state, but the player doesn't keep playing the old source unless I force to re render it. Am I miss something?
After trying to change videoSource state, video won't change. I Use HLS .m3u8 as video source. I run react-native-video 1.0.0 & react-native v0.42 |
@davidpratama that's fixed in this PR #502 |
Thanks AndrewJack, the exoplayer variant is working well for me with live HLS streams on Android. |
will I be able to play RTSP videos on android using this solution? |
@manjeets12 looks like exoplayer doesn't support it google/ExoPlayer#55 |
compiling the |
When I try converting
Any idea how to prevent this error? |
@johndanek Did you put the strings into settings.grandle in the same order as described above? |
@manuTro I'm not sure of the order you're referring to. My settings.gradle looks like:
|
@manuTro If you create a new blank react-native project and attempt to integrate the exoplayer, can you get it to work? I cannot. |
@johndanek are you sure you linked it properly? is it working without exoplayer? |
@manuTro Yep, it works (though it's a bit slow) when using it without exoplayer. |
Hi there i'm having this issue #697 when I try to integrate exoplayer, i modified the conf as you guys told but it seems that i'm missing something yet. |
I've made the integration so far, however callbacks are not triggering. The only callback that it's triggering its the onProgress , onLoadStart / onError are not working. When there are connection issues in streamer's or user's end , onError callback it's not working . |
I get a similar error to @johndanek after following @AndrewJack instructions here is the stack trace
|
@viperfx see iamronsuez/rn-video#1 Update your compileSdk, buildTools and support library to the same version that exoplayer uses. |
Thanks. Its working now. |
@johndanek did you find a solution? I'm having the same issue. |
@coniel I ended up giving up because of other problems down the line, but I think specifying |
@johndanek I had the same problem that I fixed by adding the following line:
to the gradle.properties file |
I am very new to React Native, and especially new to Android development. I had the same problem as @johndanek after following @AndrewJack instructions. I believe I also updated my compileSDK and buildtools to the appropriate versions. I've also changed the targetSdkVersion to 23. The build succeeds, however, the second I open the component that has react-native-video inside it, the application crashes, closes and gives out a warning message saying that unfortunately, my app has stopped working. And this is what I get in the log:
This is what I have in my
And this is what I have in my
I have also tried @Komeyl94 suggestion, but it did not solve anything. |
same as above |
@AndrewJack hi andrew, i follow all your steps. However i dont know if the exoplayer is working or not. I have a dash stream and the application is still throwing the onError event. |
Hi, |
Implementation of react-native-video using Google's ExoPlayer library
View the ExoPlayer README to see the new props and the props that still need to be implemented.
This also adds a buffering callback to iOS and ExoPlayer Android.
Long term I am hoping we can move to ExoPlayer as the default, if not sooner.
p.s. if you need any help maintaining this project I'd be happy to help out on the Android side.